package com.un.ebs.sys.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liubo
 * @since 2020-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Component
@TableName("sys_personnel")
public class Personnel extends Model<Personnel> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    private String userId;

    private String deptId;

    private Date birthDate;

    private String email;

    private String name;

    private Integer sex;

    private String tel;

    @TableLogic
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    private String lastModifiedAt;

    @TableField(fill = FieldFill.UPDATE)
    private Date lastModifiedTime;

    private Integer sort;

    private Boolean isRegisterAudit;

    private String address;

    private String registerRemark;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}